package com.hzncc.flowable_diboot.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
* 商机跟进 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-06-28
* Copyright © MyCorp
*/

@TableName("mdl_business_follow")
@Getter @Setter @Accessors(chain = true)
public class BusinessFollow extends BaseModel {
    private static final long serialVersionUID = 1679595230776888291L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 跟进内容
     */
    @Length(max=100, message="跟进内容长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String content;

    /**
     * 跟进时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime followTime;

    /**
     * 跟进人
     */
    @TableField()
    private String uid;

    /**
     * 附件
     */
    @TableField()
    private String attach;

    /**
     * 商机
     */
    @TableField()
    private String businessId;

    /**
     * 下次联系时间
     */
    @TableField()
    private LocalDateTime nextConnectTime;

    /**
     * 跟进方式
     */
    @TableField()
    private String followWay;

    /**
     * 签到地点
     */
    @Length(max=100, message="签到地点长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String checkInPlace;

    /**
     * 签到时间
     */
    @TableField()
    private LocalDateTime checkInTime;

    /**
     * 其他商务活动
     */
    @TableField()
    private Boolean otherActive;

    /**
     * 客户名称
     */
    @Length(max=100, message="客户名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String customerName;

    /**
     * 联系人
     */
    @Length(max=100, message="联系人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contacts;

    /**
     * 联系方式
     */
    @Length(max=100, message="联系方式长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contactWay;

    /**
     * 信息级别
     */
    @TableField()
    private String rank;

    /**
     * 签到信息id
     */
    @Length(max=32, message="签到信息id长度应小于32")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String checkInId;

    /**
     * 跟进编码
     */
    @Length(max=100, message="跟进编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField(fill = FieldFill.INSERT)
    private String code;


}